﻿

// Auto generated file
//
using System;
using System.Globalization;

internal static class LocalizationHelper
{
	public static bool IsSupported(string languageName)
	{
		if(!string.IsNullOrWhiteSpace(languageName))
		{
			switch(languageName)
			{
				case "Default":
				case "Albanian":
				case "Arabic":
				case "AzerbaijaniLat":
				case "Belarusian":
				case "Bulgarian":
				case "Catalan":
				case "ChineseSimplified":
				case "ChineseTraditional":
				case "Croatian":
				case "Czech":
				case "Danish":
				case "Dutch":
				case "EnglishUK":
				case "EnglishUSA":
				case "Estonian":
				case "Filipino":
				case "Finnish":
				case "French":
				case "German":
				case "Greek":
				case "Hebrew":
				case "Hindi":
				case "Hungarian":
				case "Indonesian":
				case "Italian":
				case "Japanese":
				case "Kazakh":
				case "Korean":
				case "Latvian":
				case "Lithuanian":
				case "Macedonian":
				case "Malay":
				case "Norwegian":
				case "Persian":
				case "Polish":
				case "PortugueseBrazil":
				case "PortuguesePortugal":
				case "Romanian":
				case "Russian":
				case "SerbianLat":
				case "Slovak":
				case "Slovenian":
				case "SpanishMexico":
				case "SpanishSpain":
				case "Swedish":
				case "Thai":
				case "Turkish":
				case "Ukrainian":
				case "UzbekLat":
				case "Vietnamese":
					return true;
			}
		}

		return false;
	}

	public static string GetFileName(string languageName)
	{
		switch(languageName)
		{
			case "Default":
				return "AppResLib.dll";
			case "Albanian":
				return "AppResLib.dll.041c.mui";
			case "Arabic":
				return "AppResLib.dll.0401.mui";
			case "AzerbaijaniLat":
				return "AppResLib.dll.042c.mui";
			case "Belarusian":
				return "AppResLib.dll.0423.mui";
			case "Bulgarian":
				return "AppResLib.dll.0402.mui";
			case "Catalan":
				return "AppResLib.dll.0403.mui";
			case "ChineseSimplified":
				return "AppResLib.dll.0804.mui";
			case "ChineseTraditional":
				return "AppResLib.dll.0404.mui";
			case "Croatian":
				return "AppResLib.dll.041a.mui";
			case "Czech":
				return "AppResLib.dll.0405.mui";
			case "Danish":
				return "AppResLib.dll.0406.mui";
			case "Dutch":
				return "AppResLib.dll.0413.mui";
			case "EnglishUK":
				return "AppResLib.dll.0809.mui";
			case "EnglishUSA":
				return "AppResLib.dll.0409.mui";
			case "Estonian":
				return "AppResLib.dll.0425.mui";
			case "Filipino":
				return "AppResLib.dll.0464.mui";
			case "Finnish":
				return "AppResLib.dll.040b.mui";
			case "French":
				return "AppResLib.dll.040c.mui";
			case "German":
				return "AppResLib.dll.0407.mui";
			case "Greek":
				return "AppResLib.dll.0408.mui";
			case "Hebrew":
				return "AppResLib.dll.040d.mui";
			case "Hindi":
				return "AppResLib.dll.0439.mui";
			case "Hungarian":
				return "AppResLib.dll.040e.mui";
			case "Indonesian":
				return "AppResLib.dll.0421.mui";
			case "Italian":
				return "AppResLib.dll.0410.mui";
			case "Japanese":
				return "AppResLib.dll.0411.mui";
			case "Kazakh":
				return "AppResLib.dll.043f.mui";
			case "Korean":
				return "AppResLib.dll.0412.mui";
			case "Latvian":
				return "AppResLib.dll.0426.mui";
			case "Lithuanian":
				return "AppResLib.dll.0427.mui";
			case "Macedonian":
				return "AppResLib.dll.042f.mui";
			case "Malay":
				return "AppResLib.dll.043e.mui";
			case "Norwegian":
				return "AppResLib.dll.0414.mui";
			case "Persian":
				return "AppResLib.dll.0429.mui";
			case "Polish":
				return "AppResLib.dll.0415.mui";
			case "PortugueseBrazil":
				return "AppResLib.dll.0416.mui";
			case "PortuguesePortugal":
				return "AppResLib.dll.0816.mui";
			case "Romanian":
				return "AppResLib.dll.0418.mui";
			case "Russian":
				return "AppResLib.dll.0419.mui";
			case "SerbianLat":
				return "AppResLib.dll.081a.mui";
			case "Slovak":
				return "AppResLib.dll.041b.mui";
			case "Slovenian":
				return "AppResLib.dll.0424.mui";
			case "SpanishMexico":
				return "AppResLib.dll.080a.mui";
			case "SpanishSpain":
				return "AppResLib.dll.0c0a.mui";
			case "Swedish":
				return "AppResLib.dll.041d.mui";
			case "Thai":
				return "AppResLib.dll.041e.mui";
			case "Turkish":
				return "AppResLib.dll.041f.mui";
			case "Ukrainian":
				return "AppResLib.dll.0422.mui";
			case "UzbekLat":
				return "AppResLib.dll.0443.mui";
			case "Vietnamese":
				return "AppResLib.dll.042a.mui";
	
		}

		throw new ApplicationException("Language " + languageName + " is not supported");
	}

	public static CultureInfo GetCulture(string languageName)
	{
		switch(languageName)
		{
			case "Default":
				return CultureInfo.InvariantCulture;
			case "Albanian":
				return CultureInfo.GetCultureInfo("sq-AL");
			case "Arabic":
				return CultureInfo.GetCultureInfo("ar-SA");
			case "AzerbaijaniLat":
				return CultureInfo.GetCultureInfo("az-Latn-AZ");
			case "Belarusian":
				return CultureInfo.GetCultureInfo("be-BY");
			case "Bulgarian":
				return CultureInfo.GetCultureInfo("bg-BG");
			case "Catalan":
				return CultureInfo.GetCultureInfo("ca-ES");
			case "ChineseSimplified":
				return CultureInfo.GetCultureInfo("zh-CN");
			case "ChineseTraditional":
				return CultureInfo.GetCultureInfo("zh-TW");
			case "Croatian":
				return CultureInfo.GetCultureInfo("hr-HR");
			case "Czech":
				return CultureInfo.GetCultureInfo("cs-CZ");
			case "Danish":
				return CultureInfo.GetCultureInfo("da-DK");
			case "Dutch":
				return CultureInfo.GetCultureInfo("nl-NL");
			case "EnglishUK":
				return CultureInfo.GetCultureInfo("en-GB");
			case "EnglishUSA":
				return CultureInfo.GetCultureInfo("en-US");
			case "Estonian":
				return CultureInfo.GetCultureInfo("et-EE");
			case "Filipino":
				return CultureInfo.GetCultureInfo("fil-PH");
			case "Finnish":
				return CultureInfo.GetCultureInfo("fi-FI");
			case "French":
				return CultureInfo.GetCultureInfo("fr-FR");
			case "German":
				return CultureInfo.GetCultureInfo("de-DE");
			case "Greek":
				return CultureInfo.GetCultureInfo("el-GR");
			case "Hebrew":
				return CultureInfo.GetCultureInfo("he-IL");
			case "Hindi":
				return CultureInfo.GetCultureInfo("hi-IN");
			case "Hungarian":
				return CultureInfo.GetCultureInfo("hu-HU");
			case "Indonesian":
				return CultureInfo.GetCultureInfo("id-ID");
			case "Italian":
				return CultureInfo.GetCultureInfo("it-IT");
			case "Japanese":
				return CultureInfo.GetCultureInfo("ja-JP");
			case "Kazakh":
				return CultureInfo.GetCultureInfo("kk-KZ");
			case "Korean":
				return CultureInfo.GetCultureInfo("ko-KR");
			case "Latvian":
				return CultureInfo.GetCultureInfo("lv-LV");
			case "Lithuanian":
				return CultureInfo.GetCultureInfo("lt-LT");
			case "Macedonian":
				return CultureInfo.GetCultureInfo("mk-MK");
			case "Malay":
				return CultureInfo.GetCultureInfo("ms-MY");
			case "Norwegian":
				return CultureInfo.GetCultureInfo("nb-NO");
			case "Persian":
				return CultureInfo.GetCultureInfo("fa-IR");
			case "Polish":
				return CultureInfo.GetCultureInfo("pl-PL");
			case "PortugueseBrazil":
				return CultureInfo.GetCultureInfo("pt-BR");
			case "PortuguesePortugal":
				return CultureInfo.GetCultureInfo("pt-PT");
			case "Romanian":
				return CultureInfo.GetCultureInfo("ro-RO");
			case "Russian":
				return CultureInfo.GetCultureInfo("ru-RU");
			case "SerbianLat":
				return CultureInfo.GetCultureInfo("sr-Latn-CS");
			case "Slovak":
				return CultureInfo.GetCultureInfo("sk-SK");
			case "Slovenian":
				return CultureInfo.GetCultureInfo("sl-SI");
			case "SpanishMexico":
				return CultureInfo.GetCultureInfo("es-MX");
			case "SpanishSpain":
				return CultureInfo.GetCultureInfo("es-ES");
			case "Swedish":
				return CultureInfo.GetCultureInfo("sv-SE");
			case "Thai":
				return CultureInfo.GetCultureInfo("th-TH");
			case "Turkish":
				return CultureInfo.GetCultureInfo("tr-TR");
			case "Ukrainian":
				return CultureInfo.GetCultureInfo("uk-UA");
			case "UzbekLat":
				return CultureInfo.GetCultureInfo("uz-Latn-UZ");
			case "Vietnamese":
				return CultureInfo.GetCultureInfo("vi-VN");
	
		}

		throw new ApplicationException("Language " + languageName + " is not supported");
	}

	public static bool IsSupportedByWP7(string languageName)
	{
		if(!string.IsNullOrWhiteSpace(languageName))
		{
			switch(languageName)
			{
				case "Default":
				case "ChineseSimplified":
				case "ChineseTraditional":
				case "Czech":
				case "Danish":
				case "Dutch":
				case "EnglishUK":
				case "EnglishUSA":
				case "Finnish":
				case "French":
				case "German":
				case "Greek":
				case "Hungarian":
				case "Indonesian":
				case "Italian":
				case "Japanese":
				case "Korean":
				case "Malay":
				case "Norwegian":
				case "Polish":
				case "PortugueseBrazil":
				case "PortuguesePortugal":
				case "Russian":
				case "SpanishSpain":
				case "Swedish":
					return true;
			}
		}

		return false;
	}
}

